Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Support FixedLenByteArrayType in DeltaByteArrayEncoder #106

Merged
merged 1 commit into from
Apr 29, 2018

Conversation

sunchao
Copy link
Owner

@sunchao sunchao commented Apr 29, 2018

This adds support for FixedLenByteArrayType in DeltaByteArrayEncoder.
The implementation basically reuses the code from ByteArrayType.

Fixes #95.

This adds support for FixedLenByteArrayType in DeltaByteArrayEncoder.
The implementation basically reuses the code from ByteArrayType.

Fixes #95.
Copy link
Collaborator

@sadikovi sadikovi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, that odd CI failure again.
Looks good! Thanks.

@@ -815,13 +819,13 @@ impl<> Decoder<ByteArrayType> for DeltaByteArrayDecoder<ByteArrayType> {
assert!(self.suffix_decoder.is_some());

let num_values = cmp::min(buffer.len(), self.num_values);
let mut v: [ByteArray; 1] = [ByteArray::new(); 1];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -842,6 +846,17 @@ impl<> Decoder<ByteArrayType> for DeltaByteArrayDecoder<ByteArrayType> {
}
}

impl<> Decoder<FixedLenByteArrayType> for DeltaByteArrayDecoder<FixedLenByteArrayType> {
fn set_data(&mut self, data: ByteBufferPtr, num_values: usize) -> Result<()> {
let s: &mut DeltaByteArrayDecoder<ByteArrayType> = unsafe { mem::transmute(self) };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is an interesting approach!

@sunchao
Copy link
Owner Author

sunchao commented Apr 29, 2018

Hmm yes. It happened again. Will investigate.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 94.997% when pulling f4d6d4d on delta_byte_array_fixed into faf33c8 on master.

@sunchao sunchao merged commit cdfca93 into master Apr 29, 2018
@sunchao
Copy link
Owner Author

sunchao commented Apr 29, 2018

Merged. Thanks @sadikovi !

@sunchao sunchao deleted the delta_byte_array_fixed branch April 29, 2018 19:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants